const apiUrl = [
	{
		url: 'https://api.yunclever.com/v2/Public/mobile/',
		name: 'ismart',
		signInApi: 'User.signIn',
		noNeedToken: ['Chat.saveBySiteId', 'Chat.getUnreadByUser']
	},
];

function componentCheck(cpn) {
	for (var i = 0; i < apiUrl.length; i++) {
		if (apiUrl[i].name == cpn) {
			return true;
		}
	}

	return false;
}

function getComponent(name) {
	for (var i = 0; i < apiUrl.length; i++) {
		if (apiUrl[i].name == name) {
			return apiUrl[i];
		}
	}

	return null;
}

module.exports = {
	secretKey: 'aedfa234e9rjfri903231ddk03lakvjz02ms23jkx956scmz12',
	timeout: 1000 * 3600,
	componentCheck: componentCheck,
	getComponent: getComponent
};
